home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / misc / bigstrut.sty < prev    next >
Text File  |  1994-06-01  |  2KB  |  38 lines

  1. %%
  2. %% bigstrut.sty  V1.0 (31-May-94)
  3. %%
  4. %% Author:  Jerry Leichter (leichter@cs.rutgers.edu)
  5. %%
  6. %% V1.0 Split out as a separate style file.
  7. %
  8. % \bigstrut[x] produces a strut which is \bigstrutjot (2pt by default) higher,
  9. % lower, or both than the standard array/table strut.  Use it in table entries
  10. % that are adjacent to \hline's to leave an extra bit of space - according to
  11. % the TeXbook (page 246), "This is a little touch that improves the appearance
  12. % of boxed tables; look for it as a mark of quality."
  13. %
  14. % Although you could use \bigstrut in an array, there isn't normally much
  15. % point since arrays are "opened up" by \jot anyway.
  16. %
  17. % \bigstrut[t] adds height; \bigstrut[b] adds depth.  Just \bigstrut adds
  18. % both.  So:  Use \bigstrut[t] in the row just *after* an \hline; \bigstrut[b]
  19. % in the row just *before*; and \bigstrut if there are \hline's both before
  20. % and after.
  21. %
  22. % Spaces after the \bigstrut are ignored, even if it has an optional argument.
  23. % Spaces before the \bigstrut are generally ignored (by a single \unskip).
  24. %
  25. % Note:  The multirow style file makes use of \bigstrutjot.  If both styles
  26. % are used, they can be used in either order, as each checks to see if the
  27. % other has already defined \bigstrutjot.  However, the default values they
  28. % set are different:  If only multirow is used, \bigstrutjot will be set to
  29. % 3pt.  If bigstrut is used, with or without multirow, \bigstrutjot will be
  30. % 2pt.
  31.  
  32. \@ifundefined{bigstrutjot}{\newdimen\bigstrutjot}{}\bigstrutjot2pt
  33. \def\bigstrut{\relax\@ifnextchar [{\@bigstrut}{\@bigstrut[x]}}
  34. \def\@bigstrut[#1]{\unskip\@tempdima\ht\@arstrutbox \@tempdimb\dp\@arstrutbox
  35.   \ifx #1b\else \advance\@tempdima by \bigstrutjot\fi
  36.   \ifx #1t\else \advance\@tempdimb by \bigstrutjot\fi
  37.   \hbox{\vrule \@height\@tempdima \@depth\@tempdimb \@width\z@}\ignorespaces}
  38.